// 云函数入口文件
const cloud = require('wx-server-sdk')
cloud.init({
  env: 'cloud1-2gn53z0t5a838e4c', //填上你的云开发环境id
  traceUser: true,
})
let db = cloud.database()
// 云函数入口函数
exports.main = async (event, context) => {

  return await db.collection('userData').orderBy('date','desc').get();
}